With development of network technologies, a problem of network security has become more prominent. Portal authentication is a method that can effectively protect network security. Portal authentication means that a terminal needs to be authorized and authenticated by a portal server to access network data.
Specifically, a portal authentication process may be as follows: When an access device receives a Hypertext Transfer Protocol (HTTP) traffic request initiated by an unauthorized terminal for the first time, the access device returns, to the terminal, an HTTP response carrying a Uniform Resource Locator (URL) address of a portal server. The terminal initiates an HTTP authentication page request to the portal server based on the URL address, and the portal server may return a response including a to-be-loaded HTTP authentication page to the terminal after completing a Transmission Control Protocol (TCP) handshake and a Secure Sockets Layer (SSL) handshake with the terminal. The terminal loads and displays the HTTP authentication page based on the response, receives authentication information input by a user on the HTTP authentication page, and sends the authentication information to the portal server for authorization and authentication.
The HTTP traffic request may be a valid traffic request initiated by the user when the user triggers a terminal browser, or may be an invalid traffic request automatically initiated by another application program in the terminal other than the browser. The access device cannot identify the valid traffic request and the invalid traffic request. Therefore, even if the terminal initiates an invalid traffic request to the access device, the terminal may still obtain the URL address of the portal server, and perform the operations of “initiating the HTTP authentication page request to the portal server and completing the TCP handshake and the SSL handshake”.
However, there is a problem that, for the invalid traffic request, the authorization and authentication cannot be completed because the terminal cannot load or display the HTTP authentication page by using the application program. In other words, the authorization and authentication operations performed after the terminal obtains the URL address of the portal server are invalid operations without results. These invalid operations without results undoubtedly occupy network resources and increase portal server load.